import program from './city/program'
import task from './county/task'
// import settle from './county/settle'
// import org from './province/org'
// import report from './county/report'
// import customer from './city/customer'
import risk from './city/risk'
// import goods from './city/goods'
// import archives from './city/archives'
// import loan from './county/loan'
export default {
  path: '/',
  component: () => import(/* webpackChunkName: "credit-app" */ '@/credit/views/city/Layout.vue'),
  meta: {
    root: true,
    title: '农业大数据信用服务平台',
    authExecutor: user => !user.scopeArr.includes('dirGuaPro'),
    // job: ['org_corp', 'org_credit'],
    org: ['org_credit'],
    // regionLevel: [2, 3], // 行政级别限制
  },
  children: [
    {
      path: '',
      redirect: 'credit',
    },
    {
      path: 'credit',
      component: { render: h => h('router-view') },
      meta: { title: '信用服务', icon: 'fa fa-fw fa-home', hidden: true },
      children: [
        {
          path: '',
          redirect: 'index',
        },
        {
          path: 'index',
          component: () =>
            import(/* webpackChunkName: "credit-index" */ '@/credit/views/county/index/Index.vue'),
          meta: { title: '主页', icon: 'fa fa-home', excludeJob: ['org_c_emp'] },
        },
        {
          path: 'index',
          component: () =>
            import(
              /* webpackChunkName: "credit-resIndex" */ '@/credit/views/city/bus/index/Index.vue'
            ),
          meta: { title: '主页', icon: 'fa fa-fw fa-home', job: ['org_c_emp'] },
        },
        {
          path: 'grade',
          component: () =>
            import(/* webpackChunkName: "credit-customer" */ '@/credit/views/city/grade/Index.vue'),
          meta: {
            title: '机构评级',
            icon: 'fa fa-fw fa-cubes',
            authExecutor: user => user.scopeArr.includes('agencyM'),
          },
        },
        // {
        //   path: 'customer',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-customer" */ '@/components/AliveView.vue'),
        //   meta: { title: '客户管理', icon: 'fa fa-fw fa-user-o', excludeJob: ['org_c_emp'] },
        //   children: customer,
        // },
        {
          path: 'program',
          component: () =>
            import(/* webpackChunkName: "credit-county-program" */ '@/components/AliveView.vue'),
          meta: { title: '项目管理', icon: 'fa fa-fw fa-list' },
          children: program,
        },
        {
          path: 'task',
          component: { render: h => h('router-view') },
          meta: {
            title: '业务管理',
            icon: 'fa fa-fw fa-newspaper-o',
          },
          children: task,
        },
        {
          path: 'template',
          component: () =>
            import(
              /* webpackChunkName: "credit-template" */ '@/credit/views/city/template/Index.vue'
            ),
          meta: {
            title: '合同模板',
            icon: 'fa fa-fw fa-file-word-o',
          },
        },
        // {
        //   path: 'loan',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-report" */ '@/components/AliveView.vue'),
        //   meta: { title: '保后管理', icon: 'fa fa-fw fa-shield' },
        //   children: loan,
        // },
        {
          path: 'risk',
          component: () =>
            import(/* webpackChunkName: "credit-report" */ '@/components/AliveView.vue'),
          meta: { title: '风险管理', icon: 'fa fa-fw fa-bug' },
          children: risk,
        },
        // {
        //   path: 'settle',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-settle" */ '@/components/AliveView.vue'),
        //   meta: { title: '结算管理', icon: 'fa fa-fw fa-wpforms' },
        //   children: settle,
        // },
        // {
        //   path: 'archives',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-archives" */ '@/components/AliveView.vue'),
        //   meta: { title: '档案管理', icon: 'fa fa-fw fa-file-pdf-o', hidden: true },
        //   children: archives,
        // },
        // {
        //   path: 'goods',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-goods" */ '@/components/AliveView.vue'),
        //   meta: {
        //     title: '产品管理',
        //     icon: 'fa fa-fw fa-file-archive-o',
        //     authExecutor: user => user.scopeArr.includes('agencyM') || user.job !== 'org_c_emp',
        //   },
        //   children: goods,
        // },
        // {
        //   path: 'org',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-org" */ '@/components/AliveView.vue'),
        //   meta: {
        //     title: '合作机构',
        //     icon: 'fa fa-fw fa-address-card-o',
        //     authExecutor: user => user.scopeArr.includes('agencyM') || user.job !== 'org_c_emp',
        //   },
        //   children: org,
        // },
        // {
        //   path: 'report',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-report" */ '@/components/AliveView.vue'),
        //   // , excludeJob: ['org_c_emp']
        //   meta: { title: '台账报表', icon: 'fa fa-fw fa-file-text-o' },
        //   children: report,
        // },
        // {
        //   path: 'user_org',
        //   name: 'userOrg',
        //   component: () =>
        //     import(/* webpackChunkName: "credit-user" */ '@/credit/views/county/user/Org.vue'),
        //   meta: { title: '组织结构', hidden: true },
        // },
        {
          path: 'flow',
          component: () =>
            import(/* webpackChunkName: "credit-flow" */ '@/credit/views/county/flow/Index.vue'),
          meta: { title: '流程管理', hidden: true },
        },
      ],
    },
  ],
}
